package org.snia.server.ejb.dataobject;

import java.util.Map;

import org.snia.cdmi.auth.Principal;
import org.snia.cdmi.model.AccessControlList;
import org.snia.cdmi.model.DataObject;
import org.snia.cdmi.model.DataObjectProperties;
import org.snia.cdmi.model.InputDataObject;
import org.snia.cdmi.model.MetaDataObject;


public interface RemoteDataObjectOperation {
	
	public void createMetaDataObject(MetaDataObject meta);
	
	public MetaDataObject getMetaDataObject(String uuid);
	
	/**
	 * 删除对象的元数据
	 * 
	 * @param uuid 对象的URI的Base64加密值
	 */
	public void deleteMetaDataObject(String uuid);
	
	public void updateMetaDataObject(String uuid, MetaDataObject meta);
	
	public void deleteDataObject(String container, String objectUri, Principal principal);
	
	public void setAccessControlPolicy(String container, String objectUri, AccessControlList acl, Principal principal);
	
	public Map<String, String> getAccessControlList(String container, String objectUri, Principal principal);
	
	public DataObjectProperties getProperties(String container, String objectUri, boolean withMetadata, Principal principal);
	
	public void setUserMetadata(String container, String objectUri, Map<String, String> metaMap, Principal principal);
	
	public Map<String, String> getUserMetadata(String container, String objectUri, Principal principal);
	
	public void createDataObject(InputDataObject object);

	public DataObject getDataObject(String container, String objectUri, Principal principal);
	
	public MetaDataObject copyDataObject(String source, String container,
			String objectUri, boolean replaceFlag, Principal principal);
}
